import type { Login, PwdForm } from '@/model'
import request from '@/utils/request'

// 获取用户信息
export const getUserInfo = (id: number) => request.get(`/user/${id}`)
// 用户登录
export const userLogin = (user: Login) =>
  request.post('/user/login', JSON.stringify(user), {
    headers: {
      'Content-Type': 'application/json'
    }
  })

// 更新密码

export const upadtePwd = (user: PwdForm) =>
  request.post('/user/updatePwd', JSON.stringify(user), {
    headers: {
      'Content-Type': 'application/json'
    }
  })
